package com.coolw.toolkit.commonspool2.config;

import lombok.Data;

/**
 * 数据库配置
 *
 * @author coolw
 * @date 2025/8/15 10:49
 */
@Data
public class DataSourceConfig {

    /**
     * 数据库连接地址
     */
    private String url;

    /**
     * 账号
     */
    private String username;

    /**
     * 密码
     */
    private String password;

    public static DataSourceConfig create(String url, String username, String password) {
        DataSourceConfig config = new DataSourceConfig();
        config.setUrl(url);
        config.setUsername(username);
        config.setPassword(password);
        return config;
    }
}
